# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=wayland-protocols
pkgver=1.38
pkgrel=0
pkgdesc="Protocols and protocol extensions complementing the Wayland core protocol"
url="https://wayland.freedesktop.org"
arch="noarch"
license="MIT"
provides="$pkgname-dev=$pkgver-r$pkgrel"
makedepends="meson wayland-dev"
source="https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/$pkgver/downloads/wayland-protocols-$pkgver.tar.xz"

case "$CARCH" in
ppc64le)
	# xdg_toplevel_interface: symbol not found in a test
	options="$options !check"
	;;
esac

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
43fc36d35bedb245deed0e2de246f42d2bbfa6ecafa094f2a7fb103d6df8ae28f3cc200bc5aa24745b9131a28381883c24779da0a6d9ac954753bd5ebb1405db  wayland-protocols-1.38.tar.xz
"
